<template>
  <div>
    <AccordionTitle v-for="(item, index) in dataToRender" :item="item" :key="index">
      <slot :filter-rows="item.items"></slot>
    </AccordionTitle>
  </div>
</template>
<script>
import AccordionTitle from './Accordion-Title.vue';
export default {
  name: "Viani-Accordion",
  components: {
    AccordionTitle
  },
  data() {
    return {
      dataToRender: [
        {
          name: 'first item',
          items: [
            {
              name: 'oil olive',
              quantity: 10,
            },
            {
              name: 'subitem 2',
              quantity: 11,
            },
          ]
        },
        {
          name: 'second item',
          items: [
            {
              name: 'subitem 1',
              quantity: 10,
            },
            {
              name: 'subitem 2',
              quantity: 11
            }
          ]
        }
      ]
    }
  }
}
</script>
<style lang="">

</style>